#ifndef _EquipIcon_h__
#define _EquipIcon_h__

#include "Global.h"




#include "../../model/proxy/ItemProxy.h"

class EquipIcon
	: public CCNode
	, public CCBMemberVariableAssigner
	, public CCBSelectorResolver
	, public CCNodeLoaderListener
	, public ViewBase
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(EquipIcon, create);
	static EquipIcon* create(CCObject* pOwer);

	EquipIcon(void);
	~EquipIcon(void);

	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);
	bool init();
	void refresh();
	void onEnter();
	void onExit();
	void setIcon(int itemID);
	void setQuality(int quality);
	void setInfo(int itemID, int quality);
    void setInfo(int itemID);
private:
	CCSprite* mBg;
	CCSprite* mIcon;
public:
	int mItemID;
	EquipQuality mQuality;
};

#endif